﻿@model MovieModel

@section Scripts {
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Views/Movie/CreateUpdateMovie.js")" type="text/javascript"></script>
}


@{
    ViewBag.Title = "Create";
}

<h2>Add</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>New Movie</legend>

         @using (Html.BeginForm()){

        @Html.Partial("_CreateUpdateMovie", Model)
        
        <p>
            <input type="submit" value="Create" />
        </p>
    }
    </fieldset>
}

<div>
    @{
        if (TempData["Post"] != null){
            <a href="#" onclick="history.go(-2); return false;">Back to List</a>
        }
        else{
            <a href="#" onclick="history.go(-1); return false;">Back to List</a>
        }
    }
</div>
